<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理系统—登录</title>
    <link rel="stylesheet" href="{{url_for('static', filename='vendor/bootstrap/dist/css/bootstrap.css')}}">
    <link rel="stylesheet" href="{{url_for('static', filename='cms/css/login.css')}}">
</head>
<body>
    <div class="panel panel-primary login-form">
        <div class="panel-heading">登录</div>
        <div class="panel-body">
            <form action="{{url_for('cms.login')}}" method="post">
                <input type="hidden" name="csrf_token" value="{{csrf_token()}}">
                <div class="form-group">
                    {{ form.email(class="form-control", placeholder="邮箱") }}
                    {% if message.email %}
                        <p class="text-danger">{{message.email[0]}}</p>
                    {% endif %}
                </div>
                <div class="form-group">
                    {{ form.password(class="form-control", placeholder="密码") }}
                    {% if message.password %}
                        <p class="text-danger">{{ message.password[0] }}</p>
                    {% endif %}
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label for="">
                            {{ form.remember(value="true") }} 一周免登录
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <button class="btn btn-primary form-control">登录</button>
                    {% if message.error %}
                        <p class="text-danger">{{ message.error }}</p>
                    {% endif %}
                </div>
            </form>
        </div>
    </div>
</body>
</html>